<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
	<link rel="Shortcut Icon" href="favicon.ico">
    <link href="./template/H-ui.min.css" rel="stylesheet" type="text/css">
    <link href="./template/H-ui.login.css" rel="stylesheet" type="text/css">
    <link href="./template/style.css" rel="stylesheet" type="text/css">
    <link href="./template/iconfont.css" rel="stylesheet" type="text/css">
    <title>欢迎登陆</title>
    <script src="./template/hm.js"></script>
    <script type="text/javascript" src="./template/jquery.min.js"></script>
    <script type="text/javascript">
        //点击切换验证码
        function changeVerifyCode() {
            $("#yzmImg").attr("src", "verifycode.jsp?" + Math.floor(Math.random() * 100));
        }
        //验证登录表单
        function check(model, name) {
            if (model.value == "") {
                document.getElementById("error").innerHTML = "<span>" + name + "不能为空！</spqn>";
            } else {
                document.getElementById("error").innerHTML = "";
            }
        }

        function checkFrom() {
            var username = document.getElementById("username").value;
            var password = document.getElementById("password").value;
            var verifyCode = document.getElementById("verifyCode").value;
            if (username == "") {
                document.getElementById("error").innerHTML = "<span>用户名不能为空！</span>";
                return false;
            } else if (password == "") {
                document.getElementById("error").innerHTML = "<span>密码不能为空！</span>";
                return false;
            } else if (verifyCode == "") {
                document.getElementById("error").innerHTML = "<span>验证码不能为空！</span>";
                return false;
            } else {
                return true;
            }
        }
    </script>
</head>

<body>
    <input type="hidden" id="TenantId" name="TenantId" value="">
    <div class="header"></div>
    <div class="loginWraper">
        <div id="loginform" class="loginBox">
            <form class="form form-horizontal" action="CheckLogin" data-title="人员管理" method="post" id="login_form" onSubmit="return checkFrom()">
                <div class="row cl">
                    <label class="form-label col-xs-3"><i class="Hui-iconfont">用户名：</i></label>
                    <div class="formControls col-xs-8">
                        <input id="username" name="username" type="text" placeholder="账号：" class="input-text size-L" onBlur="check(this, &#39;用户名&#39;)" value="" autoComplete="off">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-3"><i class="Hui-iconfont">密                 码：</i></label>
                    <div class="formControls col-xs-8">
                        <input id="password" name="password" type="password" placeholder="密码：" class="input-text size-L" onBlur="check(this, &#39;密码&#39;)" autoComplete="off">
                    </div>
                </div>

                <div class="row cl">
                    <label class="form-label col-xs-3"><i class="Hui-iconfont">验证码：</i></label>
                    <div class="formControls col-xs-8">
                        <input type="text" name="verifyCode" id="verifyCode" placeholder="验证码：" class="input-text input-texts size-L" onBlur="check(this, &#39;验证码&#39;)" autoComplete="off">
                        <img src="verifycode.jsp" onClick="changeVerifyCode()" id="yzmImg" style="cursor: pointer;">
                        <a href="javascript:void(0)" onClick="changeVerifyCode()">点击换一张</a> </div>
                </div>
                <div class="rows cl error" id="error" style="color:red">
                </div>
                <div class="rows cl">
                    <div class="formControls col-xs-8 col-xs-offset-3">
                        <input name="" type="submit" class="btn btn-success radius size-L" value=" 提    交 ">
                        <input name="" type="reset" class="btn btn-default radius size-L" value=" 重    置 ">
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="footer">Copyright © 本后台系统由KEG提供技术支持 </div>
    <script type="text/javascript" src="./template/jquery.min.js"></script>
    <script type="text/javascript" src="./template/H-ui.js"></script><a href="javascript:void(0)" class="Hui-iconfont toTop" title="返回顶部" alt="返回顶部" style="display:none"></a>

	<script>
	document.getElementById("username").focus();
	</script>
</body>

</html>